<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('material_return_detail', function (Blueprint $table) {
            $table->id()->unique()->comment('id');
$table->integer('order_id')->comment('生产退料单id');
$table->string('material_no', 100)->comment('品号');
$table->string('unit', 10)->comment('单位编码');
$table->decimal('qty')->comment('退料数量');
$table->string('location', 100)->comment('库位编码');
$table->string('lot_num', 100)->comment('箱号');
$table->string('pick_order_no', 200)->comment('领料单号');
$table->integer('pick_order_id')->comment('领料单id');
$table->string('wms_code', 50)->comment('仓库代码');
$table->creatorId();
$table->createdAt();
$table->updatedAt();
$table->deletedAt();

$table->engine='InnoDB';
$table->comment('生产退料单明细');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('material_return_detail');
    }
};
